/*
 * qualityExpand.java
 *
 * Created on __DATE__, __TIME__
 */

package RolePlayGame;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;

/**
 *
 * @author  __USER__
 */
public class qualityExpand extends javax.swing.JFrame {

	/** Creates new form qualityExpand */
	static public int stratype=0;
	public qualityExpand(/*java.awt.Frame parent, boolean modal*/) {
		//super(parent, modal);
		initComponents();
	}
	
	
	

	/** This method is called from within the constructor to
	 * initialize the form.
	 * WARNING: Do NOT modify this code. The content of this method is
	 * always regenerated by the Form Editor.
	 */
	//GEN-BEGIN:initComponents
	// <editor-fold defaultstate="collapsed" desc="Generated Code">
	private void initComponents() {

		literature = new java.awt.Button();
		label1 = new java.awt.Label();
		cyclopedia = new java.awt.Button();
		music = new java.awt.Button();
		interest = new java.awt.Button();
		history = new java.awt.Button();
		sports = new java.awt.Button();
		exit = new java.awt.Button();

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
		setTitle("\u7d20\u8d28\u62d3\u5c55\u754c\u9762");

		literature.setLabel("\u6587\u5b66\u9898\u76ee");
		literature.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				literatureActionPerformed(evt);
			}
		});

		label1.setText("\u6b22\u8fce\u8fdb\u5165\u7d20\u8d28\u62d3\u5c55");

		cyclopedia.setLabel("\u767e\u79d1\u9898\u76ee");
		cyclopedia.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				cycActionPerformed(evt);
			}
		});

		music.setLabel("\u97f3\u4e50\u9898\u76ee");
		music.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				musicActionPerformed(evt);
			}
		});

		interest.setLabel("\u8da3\u5473\u9898\u76ee");
		interest.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				interestActionPerformed(evt);
			}
		});

		history.setLabel("\u5386\u53f2\u9898\u76ee");
		history.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				historyActionPerformed(evt);
			}
		});

		sports.setLabel("\u4f53\u80b2\u9898\u76ee");
		sports.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				sportsActionPerformed(evt);
			}
		});

		exit.setLabel("\u9000\u51fa");
		exit.addActionListener(new java.awt.event.ActionListener() {
			public void actionPerformed(java.awt.event.ActionEvent evt) {
				exitActionPerformed(evt);
			}
		});

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout
				.setHorizontalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								layout
										.createSequentialGroup()
										.addGap(89, 89, 89)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.TRAILING,
																false)
														.addGroup(
																layout
																		.createSequentialGroup()
																		.addComponent(
																				history,
																				javax.swing.GroupLayout.PREFERRED_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.PREFERRED_SIZE)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				Short.MAX_VALUE)
																		.addComponent(
																				sports,
																				javax.swing.GroupLayout.PREFERRED_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.PREFERRED_SIZE))
														.addGroup(
																javax.swing.GroupLayout.Alignment.LEADING,
																layout
																		.createSequentialGroup()
																		.addComponent(
																				literature,
																				javax.swing.GroupLayout.PREFERRED_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.PREFERRED_SIZE)
																		.addPreferredGap(
																				javax.swing.LayoutStyle.ComponentPlacement.RELATED,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				Short.MAX_VALUE)
																		.addComponent(
																				cyclopedia,
																				javax.swing.GroupLayout.PREFERRED_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.PREFERRED_SIZE))
														.addGroup(
																javax.swing.GroupLayout.Alignment.LEADING,
																layout
																		.createSequentialGroup()
																		.addComponent(
																				music,
																				javax.swing.GroupLayout.PREFERRED_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.PREFERRED_SIZE)
																		.addGap(
																				85,
																				85,
																				85)
																		.addComponent(
																				interest,
																				javax.swing.GroupLayout.PREFERRED_SIZE,
																				javax.swing.GroupLayout.DEFAULT_SIZE,
																				javax.swing.GroupLayout.PREFERRED_SIZE)))
										.addContainerGap(136, Short.MAX_VALUE))
						.addGroup(
								javax.swing.GroupLayout.Alignment.TRAILING,
								layout.createSequentialGroup().addContainerGap(
										317, Short.MAX_VALUE).addComponent(
										exit,
										javax.swing.GroupLayout.PREFERRED_SIZE,
										javax.swing.GroupLayout.DEFAULT_SIZE,
										javax.swing.GroupLayout.PREFERRED_SIZE)
										.addGap(81, 81, 81)).addGroup(
								layout.createSequentialGroup().addGap(143, 143,
										143).addComponent(label1,
										javax.swing.GroupLayout.PREFERRED_SIZE,
										javax.swing.GroupLayout.DEFAULT_SIZE,
										javax.swing.GroupLayout.PREFERRED_SIZE)
										.addContainerGap(195, Short.MAX_VALUE)));
		layout
				.setVerticalGroup(layout
						.createParallelGroup(
								javax.swing.GroupLayout.Alignment.LEADING)
						.addGroup(
								layout
										.createSequentialGroup()
										.addGap(41, 41, 41)
										.addComponent(
												label1,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addGap(37, 37, 37)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING)
														.addComponent(
																literature,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE)
														.addComponent(
																cyclopedia,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addGap(61, 61, 61)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.LEADING)
														.addComponent(
																music,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE)
														.addComponent(
																interest,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addGap(65, 65, 65)
										.addGroup(
												layout
														.createParallelGroup(
																javax.swing.GroupLayout.Alignment.TRAILING)
														.addComponent(
																sports,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE)
														.addComponent(
																history,
																javax.swing.GroupLayout.PREFERRED_SIZE,
																javax.swing.GroupLayout.DEFAULT_SIZE,
																javax.swing.GroupLayout.PREFERRED_SIZE))
										.addGap(54, 54, 54)
										.addComponent(
												exit,
												javax.swing.GroupLayout.PREFERRED_SIZE,
												javax.swing.GroupLayout.DEFAULT_SIZE,
												javax.swing.GroupLayout.PREFERRED_SIZE)
										.addContainerGap(63, Short.MAX_VALUE)));

		cyclopedia.getAccessibleContext().setAccessibleParent(literature);

		pack();
	}// </editor-fold>
	//GEN-END:initComponents

	private void literatureActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		stratype=6;
		trainQuestions train = new trainQuestions();
		train.setVisible(true);
		this.setVisible(false);
	}

	private void musicActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		stratype=5;
		trainQuestions train = new trainQuestions();
		train.setVisible(true);
		this.setVisible(false);
		
	}

	private void historyActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		stratype=4;
		trainQuestions train = new trainQuestions();
		train.setVisible(true);
		this.setVisible(false);
	}

	private void sportsActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		stratype=3;
		trainQuestions train = new trainQuestions();
		train.setVisible(true);
		this.setVisible(false);
	}

	private void interestActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		stratype=2;
		trainQuestions train = new trainQuestions();
		train.setVisible(true);
	}

	private void exitActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		  this.setVisible(false);
	}

	private void cycActionPerformed(java.awt.event.ActionEvent evt) {
		// TODO add your handling code here:
		stratype=1;
		trainQuestions train = new trainQuestions();
		train.setVisible(true);
		this.setVisible(false);
	}

	/**
	 * @param args the command line arguments
	 */
	/*public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				qualityExpand dialog = new qualityExpand(
				/*new javax.swing.JFrame(), true);
				dialog.addWindowListener(new java.awt.event.WindowAdapter() {
					public void windowClosing(java.awt.event.WindowEvent e) {
						System.exit(0);
					}
				});
				dialog.setVisible(true);
			}
		});
	}*/

	//GEN-BEGIN:variables
	// Variables declaration - do not modify
	private java.awt.Button cyclopedia;
	private java.awt.Button exit;
	private java.awt.Button history;
	private java.awt.Button interest;
	private java.awt.Label label1;
	private java.awt.Button literature;
	private java.awt.Button music;
	private java.awt.Button sports;
	// End of variables declaration//GEN-END:variables

}